<template>
	<div class="drawbox flexcolumn">
		<div class="drawimg flexcenter">
			<img :src='imgPath+"/"+drawitem.photo' alt="">
		</div>
		<div class="ctitle f18 mt_24 textcenter">{{drawitem.level_name}}</div>
		<div class="f14 c_fff mt_10 textcenter">{{drawitem.draw_name}}</div>

		<div class="flexcenter detailbtn mauto mt_60 c_fff f16" @click.stop="goDetail">
			查看奖品
		</div>
		<div class="flexbetween mt_60 ">
			<div class="flexcenter detailbtn detailbtn2 mauto c_fff f16" @click.stop="closePop">
				继续抽奖
			</div>
			<div class="flexcenter detailbtn detailbtn2 mauto c_fff f16 " @click.stop="goHome">
				返回首页
			</div>
		</div>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				imgPath: uni.imgPath
			}
		},
		props: {
			drawitem: {
				default: null
			},
			taskId: {
				default: ""
			}
		},
		methods: {
			goHome() {
				//	this.$emit('close')
				uni.switchTab({
					url: "/pages/home/home"
				})

			},
			goDetail() {
				uni.navigateTo({
					url: `/pagesMy/winnrecord/index?type=2&id=${this.taskId}`
				})

			},

			closePop() {
				this.$emit('close')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.drawbox {
		width: 90vw;
		// height: 500px;
		display: flex;
		flex-direction: column;
		align-items: center;
		height: 99vh;
		margin: auto;
		font-size: 26rpx;
		// background-color: #fff;
	}

	.drawimg {
		width: 80%;
		margin: 250rpx 0 20rpx 0;
		text-align: center;

		img {
			max-width: 78%;
			margin: auto;
		}

		// height: auto;
	}

	.ctitle {
		color: #76B9FE;
	}

	.detailbtn {
		width: 300rpx;
		height: 60rpx;
		border-radius: 8rpx;
		background: linear-gradient(142deg, #EFB565 0%, #D83626 100%);
		border: 1px solid #fff;
		// background-color: #76B9FE;
		// border: 1px solid #007CFF;
	}

	.detailbtn2 {
		width: 140rpx;
		height: 60rpx;
	}

	.mauto {
		margin: 20rpx auto;
	}
</style>